package uk.ac.tess.timemanagement.todolist;

import android.util.Log;

public class ToDoItem {

	private int itemId;
	private boolean itemActive;
	private String itemDescription;
	private String itemDate;
	private String itemTime;
	
	
	public ToDoItem(boolean itemActive, String itemDescription,
			String itemDate, String itemTime){
		this(-1, itemActive, itemDescription, itemDate, itemTime);
	}
	
	public ToDoItem(int itemId, boolean itemActive, String itemDescription,
			String itemDate, String itemTime) {
		this.itemId = itemId;
		this.itemActive = itemActive;
		this.itemDescription = itemDescription;
		this.itemDate = itemDate;
		this.itemTime = itemTime;
	}
	
	public int getItemId() {
		return itemId;
	}
	
	public void setItemId(int itemId) {
		this.itemId = itemId;
	}
	
	public boolean isItemActive() {
		return itemActive;
	}
	
	public void setItemActive(boolean itemActive) {
		this.itemActive = itemActive;
	}
	
	public String getItemDescription() {
		return itemDescription;
	}
	
	public void setItemDescription(String itemDescription) {
		this.itemDescription = itemDescription;
	}
	
	public String getItemDate() {
		return itemDate;
	}
	
	public void setItemDate(String itemDate) {
		this.itemDate = itemDate;
	}
	
	public String getItemTime() {
		return itemTime;
	}
	
	public void setItemTime(String itemTime) {
		this.itemTime = itemTime;
	}

	public int getItemActiveAsInteger(){
		return (this.itemActive == true)? 1: 0;
	}
	
	public void setItemActiveUsingInteger(int itemActive){
		this.itemActive = (itemActive == 1)? true : false;
	}
	
	public void printItem(){
		Log.d("Log","Item Print Id: " + this.getItemId() +
				" Active: " + this.isItemActive() + "\n");
				//"\nDescription: " + this.getItemDescription() +// );
				//"\nDate: " + this.getItemDate() + //);
				//"\nTime: " + this.getItemTime());
	}
}
